#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;

int main()
{
	int num = 0;
	scanf("%d", &num);

	if (num < 10000)
	{
		if (num / 100 <22)
		{
			printf("20%02d-%02d\n", num / 100, num % 100);
		}
		else
		{
			printf("19%d-%02d\n", num / 100, num % 100);
		}
	}
	else
	{
		printf("%d-%02d\n", num / 100, num % 100);
	}

	return 0;
}
